package com.net.xpay.common.dao.stat;

import com.net.xpay.common.domain.stat.PartnerUserDayStat;
import com.net.xpay.common.model.PartnerUserDayStatModel;
import com.net.xpay.common.model.PartnerUserMonthStatModel;
import com.net.xpay.common.model.PartnerUserSumModel;
import com.net.xpay.common.model.search.PartnerUserDayStatSearchModel;
import com.net.common.annotation.DataCommon;
import com.net.common.dao.Page;
import com.net.common.dao.PagedMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;
import java.util.List;

@DataCommon
@Repository
public interface PartnerUserDayStatMapper extends PagedMapper<Long, PartnerUserDayStat> {
    List<PartnerUserDayStatModel> aggSearch(@Param("searchModel") PartnerUserDayStatSearchModel searchModel, @Param("page") Page page);

    long aggSearchCount(@Param("searchModel")PartnerUserDayStatSearchModel searchModel);

    PartnerUserMonthStatModel sumPartnerUserDayStatInfo(@Param("partnerId") Long partnerId, @Param("minDay") LocalDate minDay, @Param("maxDay") LocalDate maxDay);

    PartnerUserSumModel aggSum(@Param("searchModel") PartnerUserDayStatSearchModel searchModel);
}
